@echo on

rem set APP_PATH=.\unsigned_radar.jar
set APP_CLASS=org.infinity.FileMonitor

set LIB_PATH=.
set LIB_PATH=%LIB_PATH%;lib/commons-logging-1.1.1.jar
set LIB_PATH=%LIB_PATH%;lib/log4j-1.2.13.jar

:checkJAVAHOME
:if exist "%JAVA_HOME%" goto runApp
:echo.
:echo Java wasn't found in directory %JAVA_HOME%.
:goto finish

:checkJAVA
:if exist "%JAVA_HOME%/bin/java" goto runApp
:echo.
:echo Java wasn't found in directory %JAVA_HOME%/bin.
:goto finish

:runApp
"%JAVA_HOME%/bin/java" %JAVA_ARGS% -classpath "%APP_PATH%;%LIB_PATH%" %APP_CLASS%
:finish
:ENDLOCAL
PAUSE
cls